﻿@model PNProject.Core.SupportModel
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="/Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<div style="width:785px; height:25px; background-color:#363530; color:White; padding-left:10px; padding-top:5px;">
Chỉnh sửa 1 nick hỗ trợ
</div>
<div style="padding:10px; width:775px; min-height:100px; overflow:hidden;">


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
    @Html.HiddenFor(model=>model.Type)
        <legend>Form nhập - Nick hỗ trợ</legend>

        <div class="title">
            Diễn tả tiếng Việt
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <br />
        <div class="title">
            Diễn tả tiếng Anh
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        <br />
        <div class="title">
            Nickname
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nick)
            @Html.ValidationMessageFor(model => model.Nick)
        </div>
        <br />
        <div class="title">
            Loại nick
        </div>
        <input type="radio" name="typenick" id="yahoo" value="yahoo"><label for="yahoo">Yahoo</label>
        <input type="radio" name="typenick" id="skype" value="female"><label for="skype">Skype</label>
        <p>
            <input id="main-submit" type="submit" value="Thay đổi" />
        </p>
    </fieldset>
}

</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#desc").val($("#Description").val());
        if ($("#Type").val() == "True") {
            $("#yahoo").attr('checked', true);
        }
        else {
            $("#skype").attr('checked', true);
        }
        $("#main-submit").click(function () {
            $("#Type").val($("input[name='typenick']:checked").val());
        });
    });
</script>
